package com.ds.infrastructure.hyperspace.console.dao.dao;

import com.ds.infrastructure.hyperspace.console.dao.mapper.TbReleaseNodeMapper;
import com.ds.infrastructure.hyperspace.console.entity.page.TbPageWhere;
import com.ds.infrastructure.hyperspace.console.entity.table.TbReleaseNode;
import com.ds.infrastructure.hyperspace.console.entity.where.TbCustomWhere;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: yaozhendong
 * @create: 2019-09-27 15:17
 **/

@Repository
public class TbReleaseNodeDao {
    @Autowired
    TbReleaseNodeMapper tbReleaseNodeMapper;

    public TbReleaseNode selectByPrimaryKey(Long id) {
        return tbReleaseNodeMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(TbReleaseNode record) {
        return tbReleaseNodeMapper.updateByPrimaryKeySelective(record);
    }

    public int insertSelective(TbReleaseNode record) {
        return tbReleaseNodeMapper.insertSelective(record);
    }

    public List<TbReleaseNode> selectListForPage(TbReleaseNode where, TbCustomWhere mapWhere, TbPageWhere pageWhere) {
        return tbReleaseNodeMapper.selectListForPage(where, mapWhere, pageWhere);
    }

    public int selectListForPageCount(TbReleaseNode where, TbCustomWhere mapWhere) {
        return tbReleaseNodeMapper.selectListForPageCount(where, mapWhere);
    }

    public int insertList(List<TbReleaseNode> recordList) {
        if (recordList == null || recordList.isEmpty()) {
            return 0;
        }
        return tbReleaseNodeMapper.insertList(recordList);
    }
}
